package cn.com.greatwall.gateway.feign;

import java.util.List;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import cn.com.greatwall.common.constant.ServiceNameConstants;
import cn.com.greatwall.common.model.SysMenu;
import cn.com.greatwall.gateway.feign.fallback.MenuServiceFallbackFactory;

/**
 * @Author herw
 * @Time 2022-02-12 10:45:02
 * @Version 1.0
 * @Description: TODO(用一句话描述该文件做什么)
 */
@FeignClient(name = ServiceNameConstants.USER_SERVICE, fallbackFactory = MenuServiceFallbackFactory.class, decode404 = true)
public interface MenuService {
    /**
     * 角色菜单列表
     * @param roleCodes
     */
    @GetMapping(value = "/menus/{roleCodes}")
    List<SysMenu> findByRoleCodes(@PathVariable("roleCodes") String roleCodes);
}
